<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<hdjs/>
	<js file='__CONTROLLER_VIEW__/Js/js.js'/>
</head>
<body>
	<div class="menu_list">
		<ul>
			<li> <a href="{|U:'manage'}">货品管理</a></li>
			<li> <a href="{|U:'Goods/index'}">商品管理</a></li>
		</ul>
	</div>	
	<form action="" method="post">
		<input type="hidden" name="goods_gid" value="{$hd.get.goods_gid}">
		<table class="table2 hd-form">
			<thead>
				<tr>
					<list from='$attr' name='$a'>
						<td>{$a[0]['attr_name']}</td>
					</list>
					<td>货号</td>
					<td>货品数量</td>
					<td>操作</td>
				</tr>
			</thead>
			<tbody>
				<list from='$product'  name='$p'>
					<tr>
						<list from="$p['goods_attr_str']" name='$attr_name'>
							<td>{$attr_name}</td>
						</list>
						<td>{$p.product_sn}</td>
						<td>{$p.product_number}</td>
						<td>
							<a href="javascript:;" onclick="delProduct(this,{$p.product_id})">[-]</a>
						</td>
					</tr>
				</list>
				<tr>					
					<list from='$attr' name='$a'>
						<td>
							<select name="attr[{$a.0.attr_id}][]" id="">
								<option value="0">==商品属性==</option>
								<list from='$a' name='$d'>
									<option value="{$d.id}">{$d.attr_value}</option>
								</list>
							</select>
						</td>
					</list>					
					<td>
						<input type="text" name="product_sn[]">
					</td>
					<td>
						<input type="text" name="product_number[]">
					</td>
					<td class="action">
						<a href="javascript:;" onclick="addProduct(this)">[+]</a>
					</td>
				</tr>
			</tbody>	
		</table>
		<input type="submit" value="确定" class="hd-success">	
	</form>

</body>
</html>